package mybatis.web;

import java.io.IOException;
import java.util.List;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import mybatis.entity.Feature;
import mybatis.service.CartService;
import mybatis.service.FeatureService;
import mybatis.service.impl.CartServiceImpl;
import mybatis.service.impl.FeatureServiceImpl;


/**
 * Servlet implementation class TypeServlet
 */
@WebServlet("/feature/*")
public class FeatureServlet extends BaseServlet {
	public void getFeatures(HttpServletRequest request, HttpServletResponse response) {
		FeatureService service = applicationContext.getBean("featureServiceImpl", FeatureServiceImpl.class);
		List<Feature> list = service.getFeatures();
		try {
			responseJson(response,list);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
